__author__ = 'shawhen'

from . import WinNT
from . import WinBase
from . import WinUser

from .um import minwinbase as m_um_minwinbase
from .um import handleapi as m_um_handleapi
from .um import namedpipeapi as m_um_namedpipeapi
from .um import fileapi as m_um_fileapi
from .um import WinBase as m_um_WinBase
from .um import processthreadsapi as m_um_processthreadsapi
from .um import errhandlingapi as m_um_errhandlingapi
from .um import synchapi as m_um_synchapi
from .um import sysinfoapi as m_um_sysinfoapi

from .shared import minwindef as m_shared_minwindef

from ...cstd import stdio

NULL = stdio.NULL

HANDLE = WinNT.HANDLE
INVALID_HANDLE_VALUE = WinBase.INVALID_HANDLE_VALUE
SetHandleInformation = m_um_handleapi.SetHandleInformation

HANDLE_FLAG_INHERIT = m_um_WinBase.HANDLE_FLAG_INHERIT
HANDLE_FLAG_PROTECT_FROM_CLOSE = m_um_WinBase.HANDLE_FLAG_PROTECT_FROM_CLOSE

CloseHandle = m_um_handleapi.CloseHandle

BOOL = m_shared_minwindef.BOOL
TRUE = m_shared_minwindef.TRUE
FALSE = m_shared_minwindef.FALSE

SECURITY_ATTRIBUTES = m_um_minwinbase.SECURITY_ATTRIBUTES

CreatePipe = m_um_namedpipeapi.CreatePipe

ReadFile = m_um_fileapi.ReadFile
WriteFile = m_um_fileapi.WriteFile

STARTF_USESHOWWINDOW = m_um_WinBase.STARTF_USESHOWWINDOW
STARTF_USESTDHANDLES = m_um_WinBase.STARTF_USESTDHANDLES
STARTUPINFO = m_um_processthreadsapi.STARTUPINFO
PROCESS_INFORMATION = m_um_processthreadsapi.PROCESS_INFORMATION
CreateProcess = m_um_processthreadsapi.CreateProcess
TerminateProcess = m_um_processthreadsapi.TerminateProcess
GetExitCodeProcess = m_um_processthreadsapi.GetExitCodeProcess

WaitForInputIdle = WinUser.WaitForInputIdle

EnumWindows = WinUser.EnumWindows

GetWindowThreadProcessId = WinUser.GetWindowThreadProcessId

SendMessage = WinUser.SendMessage

SW_HIDE = WinUser.SW_HIDE

STILL_ACTIVE = m_um_minwinbase.STILL_ACTIVE

INFINITE = m_um_WinBase.INFINITE

WaitForSingleObject = m_um_synchapi.WaitForSingleObject

CreateMutex = m_um_synchapi.CreateMutex
ReleaseMutex = m_um_synchapi.ReleaseMutex

GlobalMemoryStatusEx = m_um_sysinfoapi.GlobalMemoryStatusEx

GetLastError = m_um_errhandlingapi.GetLastError